<template>
  <div>
    <manage-form @edit="handleEdit" @search="handleSearch" ref="manageForm" />
    <position-table @edit="handleEdit" ref="positionTable" />
    <manage-modal ref="manageModal" @refresh="handleRefresh" />
  </div>
</template>

<script>
import PositionTable from './PositionTable'
import ManageForm from './ManageForm'
import ManageModal from './ManageModal'

export default {
  name: 'PositionIndex',
  components: {
    PositionTable,
    ManageForm,
    ManageModal
  },
  methods: {
    handleEdit(bool, obj) {
      this.$refs.manageModal.edit(bool, obj)
    },
    handleSearch(obj) {
      this.$refs.positionTable.handleGetList(obj)
    },
    // 刷新表格
    handleRefresh() {
      this.$refs.positionTable.handleGetList()
    }
  }
}
</script>
